import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
testCase = "DBshop009—销售管理退货管理"
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox) #调用函数登录dbshop的后台
DBshopEnterMenu2(firefox,'销售管理','退货管理')
firefox.find_element_by_xpath('//select[@name="refund_type"]').click()
firefox.find_element_by_xpath('//option[text()="退款到账户余额"]').click()
firefox.find_element_by_xpath('//button').click()
#断言
try:
    firefox.find_element_by_xpath('/html/body/div[2]/div/div[2]/table/tbody/tr[2]/td[4]').is_displayed()
    writeLog("%s 测试通过"%testCase)
except:
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)
firefox.quit()


